package com.mycompany.lctwitter.persist.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.mycompany.lctwitter.persist.dao.LocationDao;
import com.mycompany.lctwitter.persist.model.Location;

@Service("locationService")
@Transactional(readOnly = true, propagation = Propagation.NOT_SUPPORTED, rollbackFor = Exception.class)
public class LocationService {

    @Resource
    private LocationDao locationDao;

    public List<Location> list() {
        return locationDao.list();
    }

    public Location find(long locationId) {
        return locationDao.get(locationId);
    }

}
